import { z } from "zod";
import plugins from "../../index.js";

export default {
    api: "intro",
    name: "介绍自己",
    description: "判断客户是否需要你介绍自己，比如：你是谁。",
    requestSchema: z.any(),
    func: async (arg, context) => {
        const introInfo = plugins.map(plugin => {
            const pluginInfos = plugin.children.map(item => {
                return `  ${item.name}: ${item.description}`;
            });
            return `${plugin.name}: ${plugin.description}\n${pluginInfos}`;
        }).join('\n');
        return `能力如下所示，请整合信息介绍给客户，要求足够详细，并且给问答示例。\n${introInfo}`;
    }
}